package com.tuanzi.loan.business.entity.statistics;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author Simon
 * @date 2019/07/29 14:23
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name = "ADVER_CHANNEL_TYPE_USER")
@EqualsAndHashCode(callSuper = false)
public class AdverChannelTypeUser implements Serializable {

    @Id
    @Column(name = "ID")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long    id;

    @NotNull
    @Length(max = 25)
    @Column(name = "USER_NAME")
    private String userName;

    @NotNull
    @Length(max = 25)
    @Column(name = "CHANNEL")
    private String  channel;

    @NotNull
    @Column(name = "ADS_PLATFORM_TYPE")
    @Range(min = 0, max = Integer.MAX_VALUE)
    private Integer adsPlatformType;
}
